package com.youkeyi.ddy.cloud.common.api.basic.pub.user;

import com.youkeyi.ddy.cloud.common.api.basic.pub.user.dto.PublicUserListCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.user.param.*;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * PublicUserCloudService
 *
 * @Author liuxiawang
 * @Date 2024/2/19 2:31 PM
 * @Location shenzhen.china
 */
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-BASIC-PUBLIC", fallback = PublicUserCloudServiceFallback.class)
@RequestMapping("/public/user")
public interface PublicUserCloudService {

    /**
     * 查询用户列表.
     *
     * @param param the param
     * @return the user list cloud dto
     */
    @PostMapping(value = "/query")
    public abstract PublicUserListCloudDto query(@RequestBody PublicUserQueryCloudParam param);

    /**
     * 新增用户.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/create")
    public abstract ResponseContent create(@RequestBody PublicUserCreateCloudParam param);

    /**
     * 编辑用户.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/update")
    public abstract ResponseContent update(@RequestBody PublicUserUpdateCloudParam param);

    /**
     * 修改用户密码.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/update/password")
    public abstract ResponseContent updatePassword(@RequestBody PublicUserUpdatePasswordCloudParam param);

    /**
     * 删除用户.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/delete")
    public abstract ResponseContent delete(@RequestBody PublicUserDeleteCloudParam param);

    /**
     * 更新用户小程序昵称.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/update/avatar")
    public abstract ResponseContent updateAvatar(@RequestBody PublicUserUpdateCloudParam param);

    /**
     * 更新用户小程序昵称.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/update/nick/name")
    public abstract ResponseContent updateNickName(@RequestBody PublicUserUpdateCloudParam param);

}
